a5b758c968e75614f33a149cf62d6e7952dab66a,SeriesGuide/src/main/java/com/battlelancer/seriesguide/util/DBUtils.java,DBUtils,updateUnwatchedCount,#Context#String#,137

Before Change


        total.close();

        // unwatched, aired episodes
        final Cursor unwatched = resolver.query(episodesOfSeasonUri, UnwatchedQuery.PROJECTION,
                UnwatchedQuery.AIRED_SELECTION, new String[] {
                        customCurrentTime
                }, null
        );
        if (unwatched == null) {
            return;
        }
        final int count = unwatched.getCount();
        unwatched.close();

        // unwatched, aired in the future episodes
        final Cursor unAired = resolver.query(episodesOfSeasonUri, UnwatchedQuery.PROJECTION,

After Change



        // unwatched, aired episodes
        String[] customCurrentTimeArgs = { String.valueOf(TimeTools.getCurrentTime(context)) };
        final int count = getCountOf(resolver, uri, UnwatchedQuery.AIRED_SELECTION,
                customCurrentTimeArgs, -1);
        if (count == -1) {
            return;
        }